/*
 * colorSelection.java
 *
 * Created on November 17, 2007, 12:03 PM
 * 
 * Copyright (C) 2007-2008  Hylke van der Schaaf
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, in version 3 of the License.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
package hextd.util;

import java.awt.Color;

/**
 *
 * @author  hylke
 */
public class colorSelection extends javax.swing.JPanel {

	private Color colorBaseBackGround;
	private Color colorOpenBackGround;
	private Color colorBaseHexBorder;
	private Color colorBaseHexBackGround;
	private Color colorBaseEmptyHexBorder;
	private Color colorHighlightOK;
	private Color colorHighlightNOK;
	private Color colorRangeCircle;
	private Color colorHealthLine;
	private Color colorForeGround;
	private Color colorForeGroundPale;
	private Color colorBackGround = Color.BLACK;
	private Color colorBackGroundDark = Color.BLACK;
	private Color[] playerColors = {
		new Color(255, 100, 100),
		new Color(100, 255, 100),
		new Color(100, 100, 255),
		new Color(255, 255, 100),
		new Color(255, 100, 255),
		new Color(100, 255, 255),
		new Color(255, 000, 000),
		new Color(000, 255, 000),
		new Color(000, 000, 255),
		new Color(255, 255, 000),
		new Color(255, 000, 255),
		new Color(000, 255, 255)
	};
	private Color[] playerColorsAlpha50;

	/** Creates new form colorSelection */
	public colorSelection() {
		initComponents();
		this.setVisible(false);
		playerColorsAlpha50 = new Color[playerColors.length];
		Color c;
		for (int i = 0; i < playerColors.length; i++) {
			c = playerColors[i];
			playerColorsAlpha50[i] = new Color(c.getRed(), c.getGreen(), c.getBlue(), 125);
		}
	}

	public Color getColorBaseBackGround() {
		return colorBaseBackGround;
	}

	public void setColorBaseBackGround(Color colorBaseBackGround) {
		this.colorBaseBackGround = colorBaseBackGround;
	}

	public Color getColorOpenBackGround() {
		return colorOpenBackGround;
	}

	public void setColorOpenBackGround(Color colorOpenBackGround) {
		this.colorOpenBackGround = colorOpenBackGround;
	}

	public Color getColorBaseHexBorder() {
		return colorBaseHexBorder;
	}

	public void setColorBaseHexBorder(Color colorBaseHexBorder) {
		this.colorBaseHexBorder = colorBaseHexBorder;
	}

	public Color getColorBaseEmptyHexBorder() {
		return colorBaseEmptyHexBorder;
	}

	public void setColorBaseEmptyHexBorder(Color colorBaseEmptyHexBorder) {
		this.colorBaseEmptyHexBorder = colorBaseEmptyHexBorder;
	}

	public Color getColorBaseHexBackGround() {
		return colorBaseHexBackGround;
	}

	public void setColorBaseHexBackGround(Color colorBaseHexBackGround) {
		this.colorBaseHexBackGround = colorBaseHexBackGround;
	}

	public Color getColorHighlightOK() {
		return colorHighlightOK;
	}

	public void setColorHighlightOK(Color colorHighlightOK) {
		this.colorHighlightOK = colorHighlightOK;
	}

	public Color getColorHighlightNOK() {
		return colorHighlightNOK;
	}

	public void setColorHighlightNOK(Color colorHighlightNOK) {
		this.colorHighlightNOK = colorHighlightNOK;
	}

	public Color getColorRangeCircle() {
		return colorRangeCircle;
	}

	public void setColorRangeCircle(Color colorRangeCircle) {
		this.colorRangeCircle = colorRangeCircle;
	}

	public Color getColorHealthLine() {
		return colorHealthLine;
	}

	public void setColorHealthLine(Color colorHealthLine) {
		this.colorHealthLine = colorHealthLine;
	}

	public Color getColorForeGround() {
		return colorForeGround;
	}

	public void setColorForeGround(Color colorForeGround) {
		this.colorForeGround = colorForeGround;
	}

	public Color getColorBackGround() {
		return colorBackGround;
	}

	public void setColorBackGround(Color colorBackGround) {
		this.colorBackGround = colorBackGround;
	}

	/** This method is called from within the constructor to
	 * initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
	// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
	private void initComponents() {

		setLayout(null);
	}// </editor-fold>//GEN-END:initComponents

	public Color[] getColorPlayers() {
		return this.playerColors;
	}

	public Color getColorPlayer(int player) {
		if (player >= playerColors.length) {
			player %= playerColors.length;
		}
		return playerColors[player];
	}

	public Color getColorPlayerAlpha(int player) {
		if (player >= playerColorsAlpha50.length) {
			player %= playerColorsAlpha50.length;
		}
		return playerColorsAlpha50[player];
	}

	/**
	 * @return the colorBackGroundLight
	 */
	public Color getColorBackGroundDark() {
		return colorBackGroundDark;
	}

	/**
	 * @param colorBackGroundLight the colorBackGroundLight to set
	 */
	public void setColorBackGroundDark(Color colorBackGroundDark) {
		this.colorBackGroundDark = colorBackGroundDark;
	}

	/**
	 * @return the colorForeGroundPale
	 */
	public Color getColorForeGroundPale() {
		return colorForeGroundPale;
	}

	/**
	 * @param colorForeGroundPale the colorForeGroundPale to set
	 */
	public void setColorForeGroundPale(Color colorForeGroundPale) {
		this.colorForeGroundPale = colorForeGroundPale;
	}
	// Variables declaration - do not modify//GEN-BEGIN:variables
	// End of variables declaration//GEN-END:variables
}
